#include "message.h"
#include "ui_message.h"

Message::Message(Total *total, QWidget *parent) :
    QDialog(parent),
    ui(new Ui::Message),
    total(total)
{
    ui->setupUi(this);
    beep = new Beep();
    connect(ui->pushButton,SIGNAL(clicked()),this,SLOT(pushButton_pressed()));
}

Message::~Message()
{
    delete ui;
}

void Message::pushButton_pressed()
{
    beep->beepON();
    QThread::msleep(100);
    beep->beepOFF();
    this->hide();
    total->show();
    total->serialport->close();
}
